Component({
    properties: {
        title: String,
        routerBack: {
            type: Boolean,
            value: true
        },
        background: {
            type: String,
            value: 'var(--themColor)'
        },
        color: {
            type: String,
            value: '#fff'
        },
        placeholder: { //是否生成等高占位元素
            type: true,
            value: true
        }
    },
    data: {
        navInfo: null
    },
    lifetimes: {
        attached: function() { // 在组件实例进入页面节点树时执行
            this.setData({
                navInfo: getApp().globalData.navInfo
            })
        }
    },
    methods: {
        routerGo() {
            if (!this.data.routerBack) return
            wx.navigateBack({
                delta: 1,
                fail() {
                    wx.reLaunch({ url: '/pages/index/index' })
                }
            })
        }
    }
})